package com.project.service;

import com.project.entity.Image;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;

/**
 * Created by hasee on 2017/4/28.
 */
public interface ImagesService {
    Image findById(Integer id);
    int update(Image image);
    int add(Image image);
    int delete(Integer id);
    List<Image> findall();

    /**
     * author: WheelChen
     * date: 2017-6-21
     * function: 通过url查询图片信息
     * @param url
     * @return
     */
    Image findByUrl(String url);

    /**
     * author: WheelChen
     * date: 2017/7/20
     * function: 解密文件返回base64格式
     *
     * @param path
     * @return 文件路径
     */
    String dec(String path) throws IOException;

}
